package com.cjm.one.goods.client;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.common.constant.ServerConstants;
import com.cjm.one.common.result.Result;
import com.cjm.one.model.goods.entity.GoodsCommentTag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = ServerConstants.SERVER_ONE_GOODS)
public interface GoodsCommentTagClient {
    @GetMapping("/admin/goods/comment/tag/list")
    @Operation(summary = "分页查询")
    Result<Page<GoodsCommentTag>> list(@RequestParam("current") Long current, @RequestParam("size") Long size, @RequestParam(name = "keyword",required = false) String keyword);

    @DeleteMapping("/admin/goods/comment/tag/{id}")
    @Operation(summary = "删除")
    Result<Boolean> delete(@PathVariable Long id);

    @PostMapping("/admin/goods/comment/tag")
    @Operation(summary = "保存")
    Result<Boolean> save(@RequestBody GoodsCommentTag goodsCommentTag);

    @GetMapping("/admin/goods/comment/tag/{id}")
    @Operation(summary = "根据id查询")
    Result<GoodsCommentTag> getById(@PathVariable Long id);

    @PutMapping("/admin/goods/comment/tag")
    @Operation(summary = "修改")
    Result<Boolean> update(@RequestBody GoodsCommentTag goodsCommentTag);

}
